﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AttentenceCheckSystem
{
    class PlayerManager
    {
        private Dictionary<string, PlayerRecord> _playerRecords = new Dictionary<string, PlayerRecord>();

        public PlayerRecord this[string strName]
        {
            get
            {
                if (!_playerRecords.ContainsKey(strName))
                    _playerRecords[strName] = new PlayerRecord(strName);
                return _playerRecords[strName];
            }
        }

        public void ApplyOff(string strName, DateTime dt, bool morning, bool afternoon)
        {
            this[strName].ApplyOff(dt, morning, afternoon);
        }

        //public void PostProcess(DateTime dt)
        //{
        //    foreach(PlayerRecord playerRecord in _playerRecords.Values)
        //    {
        //        playerRecord.PostProcess();
        //    }
        //}
    }
}
